package com.chzn.factoryCreateBean;

import java.util.Map;

/**
 * @Description
 * @Author houchenkai
 * @Created Date: 2020/11/2 11:44
 * @ClassName
 */
public class InstanceCityFactory {

	private Map<String, City> cities;
//	{
//		cities.put("BJ", new City("北京", "BJ"));
//		cities.put("SH", new City("上海", "SH"));
//		cities.put("CD", new City("成都", "CD"));
//		cities.put("SZ", new City("深圳", "SZ"));
//	}
	public  City getCity(String code) {
		return cities.get(code);
	}


}
